home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1999 - Modelworks Software
- // @Create build 260 cm19990128
-
- /**
- @Tool: toggleFold~shows or hides child lines.
- @EndTool:
- @Summary: toggleFold~shows or hides child lines
- */
-
- function DoCommand()
- {
- var editor = getActiveEditor();
- if (editor)
- {
- var lines = editor.getLines();
- var selection = editor.GetSelection();
- var childIndex = lines.getFirstChildLineIndex(selection.startLineIndex);
- if (childIndex != -1)
- {
- if (lines.childrenVisible(selection.startLineIndex))
- {
- lines.foldLine(selection.startLineIndex);
- }
- else
- {
- lines.unfoldLine(selection.startLineIndex);
- }
- }
- lines.update("Toggle fold");
- }
- }
-
- !!/Script
-
-